﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using System.Data;
using DataLayer;

namespace BusinnessLogic
{
   public  class TaskDetailHandler
    {

       public List<Impediments> FillImpediments(int taskid)
       {
           List<Impediments> mijnimpedimentslijst = new List<Impediments>();
           DataSet dts = new DataSet();
           dlTasks dlhandler = new dlTasks();
           dts = dlhandler.dltaskimpediments(taskid);

           for (int i = 0; i < dts.Tables[0].Rows.Count; i++)
           {
               string titel = dts.Tables[0].Rows[i]["Titel"].ToString();

               Impediments mijnimp = new Impediments(titel);
               mijnimpedimentslijst.Add(mijnimp);
           
           }

           
           return mijnimpedimentslijst;
       }
    }
}
